package com.xin.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 夜天
 * @Date 2021/12/20 20:57
 * @Version 1.0.0
 * @description：
 */
@RestController
@RequestMapping("/hello")
public class testController {
    // @PreAuthorize权限校验
    @RequestMapping("/add")
    @PreAuthorize("hasAuthority('add')")
    public String add(){
        return "success";
    }
}
